﻿@using Magicodes.Admin.Web.Areas.Admin.Models.Layout
@using Magicodes.Admin.Web.Areas.Admin.Views.Shared.Components.AdminSideBar
@using Abp.Collections.Extensions
@model SidebarViewModel
@{

}
<div class="page-sidebar navbar-collapse collapse">
    <!-- DOC: Apply "page-sidebar-menu-light" class right after "page-sidebar-menu" to enable light sidebar menu style(without borders) -->
    <!-- DOC: Apply "page-sidebar-menu-hover-submenu" class right after "page-sidebar-menu" to enable hoverable(hover vs accordion) sub menu mode -->
    <!-- DOC: Apply "page-sidebar-menu-closed" class right after "page-sidebar-menu" to collapse("page-sidebar-closed" class must be applied to the body element) the sidebar sub menu mode -->
    <!-- DOC: Set data-auto-scroll="false" to disable the sidebar from auto scrolling/focusing -->
    <!-- DOC: Set data-keep-expand="true" to keep the submenues expanded -->
    <!-- DOC: Set data-auto-speed="200" to adjust the sub menu slide up/down speed -->
    <ul class="page-sidebar-menu" data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200">
        @{var items = Model.Menu.Items.OrderBy(p => p.Order).ToList(); }
        @for (var i = 0; i < items.Count; i++)
        {
            var menuItem = items[i];
            @Html.Partial("Components/AdminSideBar/_UserMenuItem", new UserMenuItemViewModel
            {
                MenuItem = menuItem,
                MenuItemIndex = i,
                RootLevel = true,
                CurrentPageName = Model.CurrentPageName
            })
        }
    </ul>

</div>	